This invention relates to devices which sequentially control the operations of various automatic devices and more particularly to programmable sequence controllers (hereinafter referred to as "PCs") which may be connected to other PCs to enable the mutual transmitting and receiving of sequence programs.
In general, when a PC controls the sequence of operations of a mechanical device, the capability of changing the sequence or driving a plurality of devices in parallel requires upgrading of the memory capacity, processing speed or other functions. Therefore a large scale PC system is desirable.
The following two large scale PC systems presently exist:
(1) A system using one large PC 100 (having 512 or more I/O data ports, and a memory capacity of 4K or more) to directly control input/output elements is illustrated in a block diagram in FIG. 1, for example. PC 100 is connected directly to an input element 102 such as a pushbutton, and an output element 104 such as a relay coil, of a mechanical device 106 to be controlled. PC 100 is provided with an input control unit 108, an output control unit 110, a memory 112, an instruction decoder 114, an operation processing unit 116 and a program counter 118.
In such a system, since circuitry for interfacing with input/output elements 102 and 104 is within PC 100, wiring over a long distance is required between input/output elements 102 and 104 and PC 100. Furthermore, at least one wire per each input or output element is necessary. This system, therefore, is disadvantageous due to the high cost for such wiring. Furthermore, a large scale system must process a large number of instructions, and thus must operate at high speeds. This results in a significant increase of the manufacturing cost.
(2) A system where remote stations are installed for the input/output elements and data transmission is performed through the remote stations is illustrated in a block diagram shown in FIG. 2, for example. In the FIGURE, remote stations 120a, 120b..., and 120n are installed respectively near input/ output elements 102 and 104 of mechanical device 106 to be controlled. Operation processing is implemented by one high-speed PC 122, and only input data and output data are transmitted between PC 122 and remote stations 120. In this case, PC 122 is provided with a transmission control unit 124 in place of input control unit 108 and output control unit 110 shown in FIG. 1. Each remote station 120 comprises an input control unit 126, an output control unit 128 and a transmission control unit 130. This system is advantageous due to its decreased wiring cost.
In this system, a high-speed PC is required as in the case of the previously mentioned system. Moreover, all input/ output data must be transmitted between the PC and the remote stations. This system therefore, requires high-speed data transmission which disadvantageously causes the manufacturing cost to increase.
FIG. 3 illustrates a system block diagram of a commonly used PC and FIG. 4 shows a flow-chart of the operation of the PC in FIG. 3. Referring to FIG. 3, PC 132 comprises a PC control program memory 134, a PC control working memory 136, a sequence program memory 138, and an input control unit 140 and an output control unit 142 connected respectively to input/output elements 102 and 104 of a mechanical device to be controlled. These units are interconnected with each other by a common bus 144 which, in turn, is connected to a CPU 146. In PC 132, when a power source is turned on, the whole system is initialized at STEP 1 (turning output element 104 off initializing PC working memory 136 and the like) according to the system control program stored in PC control program memory 134. Next, the ON/OFF states of input elements 102 are read through input control unit 140 and then stored in input element ON/OFF state storage areas in PC working memory 136 at STEP 2. In STEP 3, the contents of the ON/OFF state storage areas for output elements 104 stored in PC control working memory 136 are supplied to output elements 104 through output control unit 142. The sequence program is read from sequence program memory 138 one instruction at a time, and decoding is carried out at STEP 4. ON/OFF data stored in PC working memory 136 is used in this processing. The decoding continues on successive instructions until the final instruction of the sequence program at STEP 5. When the final instruction is decoded, input elements 102 are again read and thus the program's loop is repeated, so that the prescribed sequence control is attained.